﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Services_getRolepurview : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/plain";
        Response.Charset = "utf-8";
        string resultJson = "";
        string r_index = "";
        r_index = Request.QueryString[0].Trim().ToString();
        
        string querystring = "";
        querystring = "select worktype from role_reg where roleid='"+r_index+"'";
        DataSet ds = AccessDatabase.Query(querystring);
        DataTable dt = ds.Tables[0];
        if (dt.Rows.Count > 0) resultJson = "{\"worktype\":\"" + dt.Rows[0][0].ToString().Trim() + "\"}";
        else resultJson = "{\"worktype\":\"0\"}";
        Response.Write(resultJson);
    }
}
